<?php
class My_View_Helper_PageTitle extends Zend_View_Helper_HeadTitle {
	/**
	 * @var array
	 * Default options
	 */
	private $options=array(
							'attachType'	=>'PREPEND',    //prepend or aapend to title
							'translate'		=>true,		    //translate page title
						  );

    /**
     * @param string $title
     * @param array $options
     */
    public function pageTitle ($pageTitle, $pageTitleParams=array(), array $options=array())
    {
        $options = array_merge($this->options, $options);

        if (empty($pageTitle)) {
            return '';
        }
        if ($options['translate']) {
            $pageTitle = $this->view->translate($pageTitle, $pageTitleParams);
        }
        $this->headTitle($pageTitle, $options['attachType']);
        return $pageTitle;

    }


}